import threading
import time
from threading import Thread
def worker():
    print("hello\n")
t1=threading.Thread(target=worker, )
t1.start()
print(t1.is_alive())
t1.join()
print(t1.is_alive())



#传参的线程
def say_hello(name):
   time.sleep(2)
   print(f'Hello {name}, Nice to meet you!')
if __name__ == '__main__':
   start = time.time()
   thread1 = Thread(target=say_hello, args=('Alice',))
   thread1.start()
   say_hello('Bob')
   thread1.join()
   exe_time = time.time() -start
   print(exe_time)